﻿using ConsoleSample.Models;
using ConsoleSample.Tools.Exports;

namespace ConsoleSample
{
    internal class Program
    {
        // ReSharper disable once UnusedParameter.Local
        static void Main(string[] args)
        {
            var info = new InvoiceInfo
            {
                InvoiceNum = "14641426",
                InvoiceDate = "2016年06月02日",
                InvoiceType = "专用发票",
                InvoiceTypeOrg = "上海增值税专用发票",
                PurchaserName = "百度时代网络技术(北京)有限公司",
                PurchaserRegisterNum = "913101140659591751",
                SellerName = "上海易火广告传媒有限公司",
                SellerRegisterNum = "110108787751579",
                TotalAmount = "94339.62",
                TotalTax = "5660.38",
                AmountInWords = "壹拾万圆整",
                AmountInFigures = "100000.00",
                NoteDrawer = "沈园园",
                Remarks = ""
            };
            var list = new List<InvoiceInfo>() { info };

            var invoiceExportHelper = new InvoiceExportHelper(list);
            var fileName = $"{DateTime.Now:yyyyMMdd_HHmmss}.xlsx";
            invoiceExportHelper.ExportExcel(fileName);

            Console.WriteLine("ExportExcel done!");
        }
    }
}
